//
//  SettingController.swift
//  设置界面
//
//  Created by jin on 2024/10/9.
//

import UIKit

class SettingController : BaseTitleController{
    
    override func initViews() {
        super.initViews()
        
        initScrollSafeArea()
        
        title = R.string.localizable.setting()
        
        contentContainer.tg_space = PADDING_MIN
        
        unplugHeadsetStopMusicView.superSwitch.isOn = PreferenceUtil.isUnplugHeadsetStopMusic()
        contentContainer.addSubview(unplugHeadsetStopMusicView)
        
        contentContainer.addSubview(downloadMobileNetworkView)
    }
    
    lazy var unplugHeadsetStopMusicView: SuperSettingView = {
        let r = SuperSettingView.create(title: R.string.localizable.unplugHeadsetStopMusic(),click:{[weak self] data in
            
        },switchChanged: { data in
            PreferenceUtil.setUnplugHeadsetStopMusic(data.isOn)
        })
        return r
    }()
    
    lazy var downloadMobileNetworkView: SuperSettingView = {
        let r = SuperSettingView.create(title: R.string.localizable.downloadMobileNetwork(),click:{[weak self] data in
            
        },switchChanged: { data in
        })
        return r
    }()
}
